Optical scanning devices that are included in electrophotographic image forming apparatuses each have a transparent window through which a laser beam that has been deflected by a polygon mirror passes to the outside of the optical scanning device. Dust adhering to the transparent window may block the laser beam and may reduce the quality of an output image. In particular, in a case where the optical scanning device is of a type that exposes a photoconductor member to light from below the photoconductor member in the direction of gravity, when detaching a cartridge, in which a developing device and the photoconductor member are integrated with each other, from the image forming apparatus, toner may fall from the developing device due to vibration and may adhere to the transparent window.
In order to solve such a problem, PTL 1 discloses an image forming apparatus that detects movement of an attachment/detachment member, such as a maintenance door, by using a sensor and that includes a shutter moving mechanism for sliding a shutter, which covers a transparent window, by using a motor in accordance with the movement of the attachment/detachment member.